home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIClipboardHelper.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  122 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIClipboardHelper.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIClipboardHelper_h__
  6. #define __gen_nsIClipboardHelper_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIClipboard_h__
  14. #include "nsIClipboard.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. #include "nsString.h" // needed for AString -> nsAString, unfortunately
  22.  
  23. /* starting interface:    nsIClipboardHelper */
  24. #define NS_ICLIPBOARDHELPER_IID_STR "44073a98-1dd2-11b2-8600-d0ae854dbe93"
  25.  
  26. #define NS_ICLIPBOARDHELPER_IID \
  27.   {0x44073a98, 0x1dd2, 0x11b2, \
  28.     { 0x86, 0x00, 0xd0, 0xae, 0x85, 0x4d, 0xbe, 0x93 }}
  29.  
  30. /**
  31.  * helper service for common uses of nsIClipboard.
  32.  */
  33. class NS_NO_VTABLE nsIClipboardHelper : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLIPBOARDHELPER_IID)
  37.  
  38.   /**
  39.    * copy string to given clipboard
  40.    *
  41.    * @param aString, the string to copy to the clipboard
  42.    * @param aClipboardID, the ID of the clipboard to copy to
  43.    *        (eg. kSelectionClipboard -- see nsIClipboard.idl)
  44.    */
  45.   /* void copyStringToClipboard (in AString aString, in long aClipboardID); */
  46.   NS_IMETHOD CopyStringToClipboard(const nsAString & aString, PRInt32 aClipboardID) = 0;
  47.  
  48.   /**
  49.    * copy string to (default) clipboard
  50.    *
  51.    * @param aString, the string to copy to the clipboard
  52.    */
  53.   /* void copyString (in AString aString); */
  54.   NS_IMETHOD CopyString(const nsAString & aString) = 0;
  55.  
  56. };
  57.  
  58. /* Use this macro when declaring classes that implement this interface. */
  59. #define NS_DECL_NSICLIPBOARDHELPER \
  60.   NS_IMETHOD CopyStringToClipboard(const nsAString & aString, PRInt32 aClipboardID); \
  61.   NS_IMETHOD CopyString(const nsAString & aString); 
  62.  
  63. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  64. #define NS_FORWARD_NSICLIPBOARDHELPER(_to) \
  65.   NS_IMETHOD CopyStringToClipboard(const nsAString & aString, PRInt32 aClipboardID) { return _to CopyStringToClipboard(aString, aClipboardID); } \
  66.   NS_IMETHOD CopyString(const nsAString & aString) { return _to CopyString(aString); } 
  67.  
  68. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  69. #define NS_FORWARD_SAFE_NSICLIPBOARDHELPER(_to) \
  70.   NS_IMETHOD CopyStringToClipboard(const nsAString & aString, PRInt32 aClipboardID) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyStringToClipboard(aString, aClipboardID); } \
  71.   NS_IMETHOD CopyString(const nsAString & aString) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyString(aString); } 
  72.  
  73. #if 0
  74. /* Use the code below as a template for the implementation class for this interface. */
  75.  
  76. /* Header file */
  77. class nsClipboardHelper : public nsIClipboardHelper
  78. {
  79. public:
  80.   NS_DECL_ISUPPORTS
  81.   NS_DECL_NSICLIPBOARDHELPER
  82.  
  83.   nsClipboardHelper();
  84.  
  85. private:
  86.   ~nsClipboardHelper();
  87.  
  88. protected:
  89.   /* additional members */
  90. };
  91.  
  92. /* Implementation file */
  93. NS_IMPL_ISUPPORTS1(nsClipboardHelper, nsIClipboardHelper)
  94.  
  95. nsClipboardHelper::nsClipboardHelper()
  96. {
  97.   /* member initializers and constructor code */
  98. }
  99.  
  100. nsClipboardHelper::~nsClipboardHelper()
  101. {
  102.   /* destructor code */
  103. }
  104.  
  105. /* void copyStringToClipboard (in AString aString, in long aClipboardID); */
  106. NS_IMETHODIMP nsClipboardHelper::CopyStringToClipboard(const nsAString & aString, PRInt32 aClipboardID)
  107. {
  108.     return NS_ERROR_NOT_IMPLEMENTED;
  109. }
  110.  
  111. /* void copyString (in AString aString); */
  112. NS_IMETHODIMP nsClipboardHelper::CopyString(const nsAString & aString)
  113. {
  114.     return NS_ERROR_NOT_IMPLEMENTED;
  115. }
  116.  
  117. /* End of implementation class template. */
  118. #endif
  119.  
  120.  
  121. #endif /* __gen_nsIClipboardHelper_h__ */
  122.